package com.alili_tv.system.mapper;

import com.alili_tv.system.entity.VideoRank;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface VideoRankMapper extends BaseMapper<VideoRank> {

    /**
     * 获取24小时前 所有视频的热度增量
     * @return
     */
    List<VideoRank> getIncrYesterday(@Param("now") LocalDateTime now);

    /**
     * 获取某一天的视频热度增量
     * @param oneDay
     * @return
     */
    List<VideoRank> getIncrAtOneDay(@Param("oneDay") LocalDateTime oneDay);
}
